package com.tbit.uqbike.client.service;

import com.alipay.api.response.AlipayTradeCreateResponse;
import com.tbit.uqbike.client.pojo.User;
import com.tbit.uqbike.client.pojo.ZfbPayConfig;

/**
 * 支付宝支付service
 *
 * @author Leon
 * 2017年2月24日 下午4:09:17
 */
public interface ZhifubaoPayService {

    /**
     * 创建充值、押金订单
     *
     * @param
     */
    String getOrder(Integer accountId, Integer userId, Double money, String remark, Boolean deposit,
                    Integer adAccountId, Integer rechargeType);

    /**
     * 创建免押会员订单
     *
     * @param user
     * @param memberFeeId
     * @return
     */
    String createOrder_memberFee(User user, Integer memberFeeId, Integer adAccountId);


    /**
     * 创建骑行会员订单
     *
     * @param user
     * @param rideCardId
     * @return
     */
    String createOrder_rideCard(User user, Integer rideCardId, Integer adAccountId);

    /**
     * 创建会员卡订单
     *
     * @param user
     * @param vipId
     * @return
     */
    String createOrder_vip(User user, Integer vipId, Integer adAccountId);

    /**
     * 创建充值、押金订单
     *
     * @param
     */
    AlipayTradeCreateResponse getOrder_xcx(Integer accountId, String code, Integer userId,
                                           Double money, String remark, Boolean deposit, Integer adAccountId, Integer rechargeType);

    /**
     * 创建免押会员订单
     *
     * @param user
     * @param memberFeeId
     * @return
     */
    AlipayTradeCreateResponse createOrder_memberFee_xcx(User user, String code, Integer memberFeeId,
                                                        Integer adAccountId);


    /**
     * 创建骑行会员订单
     *
     * @param user
     * @param rideCardId
     * @return
     */
    AlipayTradeCreateResponse createOrder_rideCard_xcx(User user, String code, Integer rideCardId,
                                                       Integer adAccountId);

    /**
     * 创建会员卡订单
     *
     * @param user
     * @param vipId
     * @return
     */
    AlipayTradeCreateResponse createOrder_vip_xcx(User user, String code, Integer vipId,
                                                  Integer adAccountId);

    /**
     * 芝麻信用检测
     *
     * @param accountId
     * @param userId
     * @return
     */
    Boolean zmxyCheck(Integer accountId, Integer userId);


    /**
     * 创建优惠券套餐订单
     *
     * @param user
     * @param mealId
     * @return
     */
    String createOrder_meal(User user, Integer mealId, Integer adAccountId);

    /**
     * 创建优惠券套餐订单
     *
     * @param user
     * @param mealId
     * @return
     */
    AlipayTradeCreateResponse createOrder_meal_xcx(User user, String code, Integer mealId,
                                                   Integer adAccountId);

    /**
     * 信用免押
     *
     * @param accountId
     * @param userId
     * @param money
     * @param remark
     * @param adAccountId
     * @param rechargeType
     * @return
     */
    String fundAuthOrderAppFreeze(Integer accountId, Integer userId, Double money,
                                  String remark, Integer adAccountId, Integer rechargeType);

    /**
     * 信用免押解冻
     *
     * @param user
     * @return
     */
    Boolean zfbFundAuthOrderAppUnfreeze(User user);

    void getAlipayUserInfo(String accessToken, User user, ZfbPayConfig zfbPayConfig);
}  